package com.lanchetech.common.enums;

import lombok.Getter;

@Getter
public enum SpuHiddenEnum {
    VISIBLE((byte) 0, "上架中"),
    MERCHANT_HIDE((byte) 1, "商家下架"),
    PLATFORM_HIDE((byte) 2, "平台下架"),
    WAIT_AUDIT((byte) 3, "待审核"),
    ;

    private Byte type;
    private String remark;

    SpuHiddenEnum(Byte type, String remark) {
        this.type = type;
        this.remark = remark;
    }

    public static String getRemarkByType(Byte type) {
        for (SpuHiddenEnum item : SpuHiddenEnum.values()) {
            if (item.getType().equals(type)) {
                return item.getRemark();
            }
        }
        return "";
    }
}
